﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Meqs.Entity;
using Meqs.Entity.Views;

namespace Meqs.Logic.Interface
{
    public interface IEvalSheetsLogic : IMultiCommonLogic<EvalSheets, int>
    {
        /// <summary>
        /// 保存或更新EvalSheet
        /// </summary>
        /// <param name="sheets"></param>
        /// <param name="teachCode"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        int SaveOrUpdateEvalSheet(EvalSheets sheets, string teachCode, string schoolMark);

        /// <summary>
        /// 删除EvalSheet
        /// </summary>
        /// <param name="sheetID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        int DeleteEvalSheet(int sheetID, string schoolMark);

        /// <summary>
        /// 根据seid删除EvalSheet
        /// </summary>
        int DeleteEvalSheetByStudentEval(int SeID, string schoolMark);

        /// <summary>
        /// 查询对象
        /// </summary>
        /// <param name="sheetID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        EvalSheetsExtend FindExtendById(int sheetID, string schoolMark);

        /// <summary>
        /// 查询当前对象
        /// </summary>
        /// <param name="teachID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        EvalSheetsExtend FindCurrentExtend(int teachID, string schoolMark);

        /// <summary>
        /// 获取日期列表
        /// </summary>
        /// <param name="teachID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<DateTime> GetDateList(int teachID, string schoolMark);

        /// <summary>
        /// 获取教师评估项树的xml文件内容
        /// </summary>
        /// <param name="teachID"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        string GetSheetItemXmlStr(int teachID, string startDate, string endDate, string schoolMark);

        /// <summary>
        /// 获取教师评估项树的xml文件内容
        /// </summary>
        /// <param name="teachID"></param>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        object[] GetSheetItemXmlStr1(int teachID, string startDate, string endDate, string schoolMark);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="sheetsExtend"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        int UpdateEvalSheet(EvalSheetsExtend sheetsExtend, string schoolMark);

        /// <summary>
        /// 查询学生评项目
        /// </summary>
        ArrayList GetStudentEvals(int evalId, String schoolMark);

        /// <summary>
        /// 创建学生评价项
        /// </summary>
        int CreateStudentEval(EvalSheets sheets, String schoolMark);

        /// <summary>
        /// 获取有评估的月份
        /// </summary>
        ArrayList GetEvalMonth(Hashtable ht);

        /// <summary>
        /// 查询表单表里面的所有月份
        /// </summary>
        /// <param name="ht"></param>
        /// <returns></returns>
        ArrayList GetEvalAllMonth(Hashtable ht);

        /// <summary>
        /// 个人单项报表
        /// </summary>
        IList<PersonSingleReportView> GetPersonSingleReport(String schoolMark, DateTime begin, DateTime end, int evalItemId, int teacherId);

        /// <summary>
        /// 个人汇总报表
        /// </summary>
        IList<PersonSummaryReportView> GetPersonSummaryReport(String schoolMark, DateTime begin, DateTime end, int teacherId);

        /// <summary>
        /// 单项汇总报表
        /// </summary>
        IList<SingleSummaryReportView> GetSingleSummaryReport(String schoolMark, DateTime begin, DateTime end, int evalItemId, int groupType, int groupID);

        /// <summary>
        /// 根据学校标识获取某个学校的教师评分汇总
        /// </summary>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        IList<ReportCollectView> GetReportCollectView(String schoolMark, DateTime begin, DateTime end);

        /// <summary>
        /// 判断检查单的修改状态
        /// true:  可修改
        /// false: 不可修改
        /// </summary>
        /// <param name="sheetID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        bool GetModifyState(int sheetID, string schoolMark);

        /// <summary>
        /// 获取时间范围内所有检查单所属的检查项
        /// </summary>
        IList<EvalRateView> GetEvaledEvalItems(DateTime begin, DateTime end, String schoolMark, int groupType, int groupID);

        /// <summary>
        /// 获取当前EvalSheets
        /// </summary>
        /// <param name="teacherID"></param>
        /// <param name="seID"></param>
        /// <param name="schoolMark"></param>
        /// <returns></returns>
        EvalSheets GetEvalSheetsByTeacherStudentEval(int teacherID, int seID, string schoolMark);
    }
}
